Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing depracation warning: time.clock(); collections.Iterable #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tomasprinda
Copy link
Contributor

Changed if isinstance(module, collections.Iterable) to if isinstance(module, collections.abc.Iterable). From doc abc was added in python 3.3, so it might not work on earlier versions. Is it problem for somebody?

Changed time.clock() to timeit.default_timer()

closes #27

@tomasprinda
Copy link
Contributor Author

Failing in python 3.4. :(

What do you think about this solution? It should be even more reliable.
https://stackoverflow.com/a/1952655/6579599

@tomasprinda
Copy link
Contributor Author

And thanks to @tivvit for Travis CI testing. Now I see it is very useful. ;-)

@alaneckhardt
Copy link
Contributor

I looked where this is used - chain_repr nor chain_mtime are not crucial, they're for user info only.
I would be fine with ducktyping approach using try except. The check is there only so that the following for module in chain: succeeds.

@tirkarthi
Copy link

time.clock is now removed in 3.8 : python/cpython#13270

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DeprecationWarning
3 participants